



// This code is a generated code by a tool
// designed and coded by Shohdi Mohamed Elsheemy ( shohdi@gmail.com )            

using System;
using System.Collections.Generic;
using System.Web;
using System.Data.Common;
using Shohdi.DataHandler;
using System.Data;




namespace DatabaseComponent
{
    
    public partial class SupportVideosDB
    {
         string _Connection = "";


        public string Connection
        {
            get { return _Connection; }
            set { _Connection = value; }
        }


       
         string _Provider = "System.Data.SqlClient";

        
        public string Provider
        {
            get { return _Provider; }
            set { _Provider = value; }
        }



        public SupportVideosDB()
        {
        }

        public SupportVideosDB(string __Connection,params string [] __Provider)
        {

            if (__Provider.Length > 0)
                _Provider = __Provider[0];

            _Connection = __Connection;
            
        }




        public List<SupportVideos> Select(ClassDataHandler con, string strTop, string strWhere, params DbParameter[] whereParams)
        {
            if (whereParams == null)
                whereParams = new DbParameter[0];

            List<SupportVideos> lstRet = new List<SupportVideos>();

            string strQuery = " select " + strTop  + " * from dbo.[SupportVideos]  " ;

            if (strWhere != "")
            {
                strQuery = strQuery + "  " + strWhere;
            }

            DbDataReader dr = con.SelectDataReader(strQuery, CommandType.Text, whereParams);


            if (dr.HasRows)
            {
                while (dr.Read())
                {
                    SupportVideos obj = new SupportVideos();
 if (dr["ID"] != DBNull.Value)
                    {
                        obj.ID = (System.Int64)dr["ID"];
                    }
                    else
                    {
                        obj.ID = -1;
                    } 
 if (dr["VideoTitleEN"] != DBNull.Value)
                    {
                        obj.VideoTitleEN = (System.String)dr["VideoTitleEN"];
                    }
                    else
                    {
                        obj.VideoTitleEN = "";
                    } 
 if (dr["VideoTitleAR"] != DBNull.Value)
                    {
                        obj.VideoTitleAR = (System.String)dr["VideoTitleAR"];
                    }
                    else
                    {
                        obj.VideoTitleAR = "";
                    } 
 if (dr["VideoDescriptionEN"] != DBNull.Value)
                    {
                        obj.VideoDescriptionEN = (System.String)dr["VideoDescriptionEN"];
                    }
                    else
                    {
                        obj.VideoDescriptionEN = "";
                    } 
 if (dr["VideoDescriptionAR"] != DBNull.Value)
                    {
                        obj.VideoDescriptionAR = (System.String)dr["VideoDescriptionAR"];
                    }
                    else
                    {
                        obj.VideoDescriptionAR = "";
                    } 
 if (dr["VideoFile"] != DBNull.Value)
                    {
                        obj.VideoFile = (System.String)dr["VideoFile"];
                    }
                    else
                    {
                        obj.VideoFile = "";
                    } 



                    lstRet.Add(obj);
                   

                }
            }

            dr.Close();


            return lstRet;
        }


        public List<SupportVideos> Select(string strTop, string strWhere, params DbParameter[] whereParams)
        {
            ClassDataHandler con = new ClassDataHandler(_Connection, _Provider);

            con.OpenConnection();

            List<SupportVideos> lstRet = Select(con, strTop, strWhere, whereParams);

            con.CloseConnection();

            return lstRet;
        }

        



        public void Insert(ClassDataHandler con , SupportVideos obj)
        {
            
            

                    DbParameter prmVideoTitleEN = con.createParameter();
                    prmVideoTitleEN.ParameterName = "@VideoTitleEN";
                    prmVideoTitleEN.DbType =DbType.String;
                    if (obj.VideoTitleEN == null)
                    {
                        prmVideoTitleEN.Value = DBNull.Value;
                    }
                    else
                    {
                        prmVideoTitleEN.Value = obj.VideoTitleEN;
                    }
                

                    


                    DbParameter prmVideoTitleAR = con.createParameter();
                    prmVideoTitleAR.ParameterName = "@VideoTitleAR";
                    prmVideoTitleAR.DbType =DbType.String;
                    if (obj.VideoTitleAR == null)
                    {
                        prmVideoTitleAR.Value = DBNull.Value;
                    }
                    else
                    {
                        prmVideoTitleAR.Value = obj.VideoTitleAR;
                    }
                

                    


                    DbParameter prmVideoDescriptionEN = con.createParameter();
                    prmVideoDescriptionEN.ParameterName = "@VideoDescriptionEN";
                    prmVideoDescriptionEN.DbType =DbType.String;
                    if (obj.VideoDescriptionEN == null)
                    {
                        prmVideoDescriptionEN.Value = DBNull.Value;
                    }
                    else
                    {
                        prmVideoDescriptionEN.Value = obj.VideoDescriptionEN;
                    }
                

                    


                    DbParameter prmVideoDescriptionAR = con.createParameter();
                    prmVideoDescriptionAR.ParameterName = "@VideoDescriptionAR";
                    prmVideoDescriptionAR.DbType =DbType.String;
                    if (obj.VideoDescriptionAR == null)
                    {
                        prmVideoDescriptionAR.Value = DBNull.Value;
                    }
                    else
                    {
                        prmVideoDescriptionAR.Value = obj.VideoDescriptionAR;
                    }
                

                    


                    DbParameter prmVideoFile = con.createParameter();
                    prmVideoFile.ParameterName = "@VideoFile";
                    prmVideoFile.DbType =DbType.String;
                    if (obj.VideoFile == null)
                    {
                        prmVideoFile.Value = DBNull.Value;
                    }
                    else
                    {
                        prmVideoFile.Value = obj.VideoFile;
                    }
                

                    


           



            string strQuery = " insert into dbo.[SupportVideos] ([VideoTitleEN],[VideoTitleAR],[VideoDescriptionEN],[VideoDescriptionAR],[VideoFile]) VALUES (@VideoTitleEN,@VideoTitleAR,@VideoDescriptionEN,@VideoDescriptionAR,@VideoFile) ; select SCOPE_IDENTITY() ";
 object scope = con.ExecuteScalar(strQuery, CommandType.Text, prmVideoTitleEN,prmVideoTitleAR,prmVideoDescriptionEN,prmVideoDescriptionAR,prmVideoFile);


                    try
                    {
                        obj.ID = System.Int64.Parse(scope.ToString());
                    }
                    catch
                    {
                        obj.ID = -1;
                    }


                    


           

        }



        public void Insert(SupportVideos obj)
        {
            ClassDataHandler con = new ClassDataHandler(_Connection, _Provider);
            con.OpenConnection();

            Insert(con,obj);


            con.CloseConnection();
        }




        public void Update(ClassDataHandler con, SupportVideos obj)
        {
            
            

                    DbParameter prmID = con.createParameter();
                    prmID.ParameterName = "@ID";
                    prmID.DbType =DbType.Int64;
                    if (obj.ID == null)
                    {
                        prmID.Value = DBNull.Value;
                    }
                    else
                    {
                        prmID.Value = obj.ID;
                    }
                

                    


                    DbParameter prmVideoTitleEN = con.createParameter();
                    prmVideoTitleEN.ParameterName = "@VideoTitleEN";
                    prmVideoTitleEN.DbType =DbType.String;
                    if (obj.VideoTitleEN == null)
                    {
                        prmVideoTitleEN.Value = DBNull.Value;
                    }
                    else
                    {
                        prmVideoTitleEN.Value = obj.VideoTitleEN;
                    }
                

                    


                    DbParameter prmVideoTitleAR = con.createParameter();
                    prmVideoTitleAR.ParameterName = "@VideoTitleAR";
                    prmVideoTitleAR.DbType =DbType.String;
                    if (obj.VideoTitleAR == null)
                    {
                        prmVideoTitleAR.Value = DBNull.Value;
                    }
                    else
                    {
                        prmVideoTitleAR.Value = obj.VideoTitleAR;
                    }
                

                    


                    DbParameter prmVideoDescriptionEN = con.createParameter();
                    prmVideoDescriptionEN.ParameterName = "@VideoDescriptionEN";
                    prmVideoDescriptionEN.DbType =DbType.String;
                    if (obj.VideoDescriptionEN == null)
                    {
                        prmVideoDescriptionEN.Value = DBNull.Value;
                    }
                    else
                    {
                        prmVideoDescriptionEN.Value = obj.VideoDescriptionEN;
                    }
                

                    


                    DbParameter prmVideoDescriptionAR = con.createParameter();
                    prmVideoDescriptionAR.ParameterName = "@VideoDescriptionAR";
                    prmVideoDescriptionAR.DbType =DbType.String;
                    if (obj.VideoDescriptionAR == null)
                    {
                        prmVideoDescriptionAR.Value = DBNull.Value;
                    }
                    else
                    {
                        prmVideoDescriptionAR.Value = obj.VideoDescriptionAR;
                    }
                

                    


                    DbParameter prmVideoFile = con.createParameter();
                    prmVideoFile.ParameterName = "@VideoFile";
                    prmVideoFile.DbType =DbType.String;
                    if (obj.VideoFile == null)
                    {
                        prmVideoFile.Value = DBNull.Value;
                    }
                    else
                    {
                        prmVideoFile.Value = obj.VideoFile;
                    }
                

                    


           



            string strQuery = " update dbo.[SupportVideos] set [VideoTitleEN]=@VideoTitleEN,[VideoTitleAR]=@VideoTitleAR,[VideoDescriptionEN]=@VideoDescriptionEN,[VideoDescriptionAR]=@VideoDescriptionAR,[VideoFile]=@VideoFile where  [ID]=@ID  ";

            con.ExecuteNonQuery(strQuery, CommandType.Text,prmID,prmVideoTitleEN,prmVideoTitleAR,prmVideoDescriptionEN,prmVideoDescriptionAR,prmVideoFile);

            

        }


        public void Update(SupportVideos obj)
        {
            ClassDataHandler con = new ClassDataHandler(_Connection, _Provider);
            con.OpenConnection();

            Update(con, obj);


            con.CloseConnection();
        }



        public void Delete(ClassDataHandler con, SupportVideos obj)
        {

            

                    DbParameter prmID = con.createParameter();
                    prmID.ParameterName = "@ID";
                    prmID.DbType =DbType.Int64;
                    if (obj.ID == null)
                    {
                        prmID.Value = DBNull.Value;
                    }
                    else
                    {
                        prmID.Value = obj.ID;
                    }
                

                    


           



           



            string strQuery = " delete from dbo.[SupportVideos]  where  [ID]=@ID  "; 
                        con.ExecuteNonQuery(strQuery, CommandType.Text,prmID );  

             



        }


        public void Delete( SupportVideos obj)
        {
            ClassDataHandler con = new ClassDataHandler(_Connection, _Provider);

            con.OpenConnection();

            Delete(con, obj);

            con.CloseConnection();
        }





                    public List<SupportVideos> getSupportVideosByID(ClassDataHandler con,System.Int64 ID)
                    {
                        List<SupportVideos> lstRet = new List<SupportVideos>();


                        DbParameter prmID = con.createParameter();
                        prmID.ParameterName = "@ID";
                        prmID.DbType = DbType.Int64;
                        if (ID == null)
                        {
                            return lstRet;
                        }
                        else
                        {
                            prmID.Value = ID;
                        }


                        lstRet = Select(con, "" , " where [ID]=@ID ", prmID);



                        return lstRet;

                    }


                    public List<SupportVideos> getSupportVideosByID(System.Int64 ID)
                    {
                        List<SupportVideos> lstRet = new List<SupportVideos>();

                        ClassDataHandler con = new ClassDataHandler(_Connection, _Provider);
                        con.OpenConnection();

                        lstRet = getSupportVideosByID(con, ID);

                        con.CloseConnection();

                        return lstRet;

                    }



                

                    public List<SupportVideos> getSupportVideosByVideoTitleEN(ClassDataHandler con,System.String VideoTitleEN)
                    {
                        List<SupportVideos> lstRet = new List<SupportVideos>();


                        DbParameter prmVideoTitleEN = con.createParameter();
                        prmVideoTitleEN.ParameterName = "@VideoTitleEN";
                        prmVideoTitleEN.DbType = DbType.String;
                        if (VideoTitleEN == null)
                        {
                            return lstRet;
                        }
                        else
                        {
                            prmVideoTitleEN.Value = VideoTitleEN;
                        }


                        lstRet = Select(con, "" , " where [VideoTitleEN]=@VideoTitleEN ", prmVideoTitleEN);



                        return lstRet;

                    }


                    public List<SupportVideos> getSupportVideosByVideoTitleEN(System.String VideoTitleEN)
                    {
                        List<SupportVideos> lstRet = new List<SupportVideos>();

                        ClassDataHandler con = new ClassDataHandler(_Connection, _Provider);
                        con.OpenConnection();

                        lstRet = getSupportVideosByVideoTitleEN(con, VideoTitleEN);

                        con.CloseConnection();

                        return lstRet;

                    }



                

                    public List<SupportVideos> getSupportVideosByVideoTitleAR(ClassDataHandler con,System.String VideoTitleAR)
                    {
                        List<SupportVideos> lstRet = new List<SupportVideos>();


                        DbParameter prmVideoTitleAR = con.createParameter();
                        prmVideoTitleAR.ParameterName = "@VideoTitleAR";
                        prmVideoTitleAR.DbType = DbType.String;
                        if (VideoTitleAR == null)
                        {
                            return lstRet;
                        }
                        else
                        {
                            prmVideoTitleAR.Value = VideoTitleAR;
                        }


                        lstRet = Select(con, "" , " where [VideoTitleAR]=@VideoTitleAR ", prmVideoTitleAR);



                        return lstRet;

                    }


                    public List<SupportVideos> getSupportVideosByVideoTitleAR(System.String VideoTitleAR)
                    {
                        List<SupportVideos> lstRet = new List<SupportVideos>();

                        ClassDataHandler con = new ClassDataHandler(_Connection, _Provider);
                        con.OpenConnection();

                        lstRet = getSupportVideosByVideoTitleAR(con, VideoTitleAR);

                        con.CloseConnection();

                        return lstRet;

                    }



                

                    public List<SupportVideos> getSupportVideosByVideoDescriptionEN(ClassDataHandler con,System.String VideoDescriptionEN)
                    {
                        List<SupportVideos> lstRet = new List<SupportVideos>();


                        DbParameter prmVideoDescriptionEN = con.createParameter();
                        prmVideoDescriptionEN.ParameterName = "@VideoDescriptionEN";
                        prmVideoDescriptionEN.DbType = DbType.String;
                        if (VideoDescriptionEN == null)
                        {
                            return lstRet;
                        }
                        else
                        {
                            prmVideoDescriptionEN.Value = VideoDescriptionEN;
                        }


                        lstRet = Select(con, "" , " where [VideoDescriptionEN]=@VideoDescriptionEN ", prmVideoDescriptionEN);



                        return lstRet;

                    }


                    public List<SupportVideos> getSupportVideosByVideoDescriptionEN(System.String VideoDescriptionEN)
                    {
                        List<SupportVideos> lstRet = new List<SupportVideos>();

                        ClassDataHandler con = new ClassDataHandler(_Connection, _Provider);
                        con.OpenConnection();

                        lstRet = getSupportVideosByVideoDescriptionEN(con, VideoDescriptionEN);

                        con.CloseConnection();

                        return lstRet;

                    }



                

                    public List<SupportVideos> getSupportVideosByVideoDescriptionAR(ClassDataHandler con,System.String VideoDescriptionAR)
                    {
                        List<SupportVideos> lstRet = new List<SupportVideos>();


                        DbParameter prmVideoDescriptionAR = con.createParameter();
                        prmVideoDescriptionAR.ParameterName = "@VideoDescriptionAR";
                        prmVideoDescriptionAR.DbType = DbType.String;
                        if (VideoDescriptionAR == null)
                        {
                            return lstRet;
                        }
                        else
                        {
                            prmVideoDescriptionAR.Value = VideoDescriptionAR;
                        }


                        lstRet = Select(con, "" , " where [VideoDescriptionAR]=@VideoDescriptionAR ", prmVideoDescriptionAR);



                        return lstRet;

                    }


                    public List<SupportVideos> getSupportVideosByVideoDescriptionAR(System.String VideoDescriptionAR)
                    {
                        List<SupportVideos> lstRet = new List<SupportVideos>();

                        ClassDataHandler con = new ClassDataHandler(_Connection, _Provider);
                        con.OpenConnection();

                        lstRet = getSupportVideosByVideoDescriptionAR(con, VideoDescriptionAR);

                        con.CloseConnection();

                        return lstRet;

                    }



                

                    public List<SupportVideos> getSupportVideosByVideoFile(ClassDataHandler con,System.String VideoFile)
                    {
                        List<SupportVideos> lstRet = new List<SupportVideos>();


                        DbParameter prmVideoFile = con.createParameter();
                        prmVideoFile.ParameterName = "@VideoFile";
                        prmVideoFile.DbType = DbType.String;
                        if (VideoFile == null)
                        {
                            return lstRet;
                        }
                        else
                        {
                            prmVideoFile.Value = VideoFile;
                        }


                        lstRet = Select(con, "" , " where [VideoFile]=@VideoFile ", prmVideoFile);



                        return lstRet;

                    }


                    public List<SupportVideos> getSupportVideosByVideoFile(System.String VideoFile)
                    {
                        List<SupportVideos> lstRet = new List<SupportVideos>();

                        ClassDataHandler con = new ClassDataHandler(_Connection, _Provider);
                        con.OpenConnection();

                        lstRet = getSupportVideosByVideoFile(con, VideoFile);

                        con.CloseConnection();

                        return lstRet;

                    }



                

            
public List<SupportVideos> Search(ClassDataHandler con, SupportVideos obj)
        {
            string strWhere = "";
            List<DbParameter> lstParameters = new List<DbParameter>();

            
                    if (obj.ID != -1)
                    {
                        DbParameter prmID = con.createParameter();
                        prmID.ParameterName = "@ID";
                        prmID.DbType =DbType.Int64;
                        if (obj.ID == null)
                        {
                            prmID.Value = DBNull.Value;
                        }
                        else
                        {
                            prmID.Value = obj.ID;
                        }
                        strWhere += " [ID]=@ID AND ";
                        lstParameters.Add(prmID);
                     }



                    

                    if (obj.VideoTitleEN != "")
                    {
                        DbParameter prmVideoTitleEN = con.createParameter();
                        prmVideoTitleEN.ParameterName = "@VideoTitleEN";
                        prmVideoTitleEN.DbType =DbType.String;
                        if (obj.VideoTitleEN == null)
                        {
                            prmVideoTitleEN.Value = DBNull.Value;
                        }
                        else
                        {
                            prmVideoTitleEN.Value = obj.VideoTitleEN;
                        }
                        strWhere += " [VideoTitleEN]=@VideoTitleEN AND ";
                        lstParameters.Add(prmVideoTitleEN);
                     }



                    

                    if (obj.VideoTitleAR != "")
                    {
                        DbParameter prmVideoTitleAR = con.createParameter();
                        prmVideoTitleAR.ParameterName = "@VideoTitleAR";
                        prmVideoTitleAR.DbType =DbType.String;
                        if (obj.VideoTitleAR == null)
                        {
                            prmVideoTitleAR.Value = DBNull.Value;
                        }
                        else
                        {
                            prmVideoTitleAR.Value = obj.VideoTitleAR;
                        }
                        strWhere += " [VideoTitleAR]=@VideoTitleAR AND ";
                        lstParameters.Add(prmVideoTitleAR);
                     }



                    

                    if (obj.VideoDescriptionEN != "")
                    {
                        DbParameter prmVideoDescriptionEN = con.createParameter();
                        prmVideoDescriptionEN.ParameterName = "@VideoDescriptionEN";
                        prmVideoDescriptionEN.DbType =DbType.String;
                        if (obj.VideoDescriptionEN == null)
                        {
                            prmVideoDescriptionEN.Value = DBNull.Value;
                        }
                        else
                        {
                            prmVideoDescriptionEN.Value = obj.VideoDescriptionEN;
                        }
                        strWhere += " [VideoDescriptionEN]=@VideoDescriptionEN AND ";
                        lstParameters.Add(prmVideoDescriptionEN);
                     }



                    

                    if (obj.VideoDescriptionAR != "")
                    {
                        DbParameter prmVideoDescriptionAR = con.createParameter();
                        prmVideoDescriptionAR.ParameterName = "@VideoDescriptionAR";
                        prmVideoDescriptionAR.DbType =DbType.String;
                        if (obj.VideoDescriptionAR == null)
                        {
                            prmVideoDescriptionAR.Value = DBNull.Value;
                        }
                        else
                        {
                            prmVideoDescriptionAR.Value = obj.VideoDescriptionAR;
                        }
                        strWhere += " [VideoDescriptionAR]=@VideoDescriptionAR AND ";
                        lstParameters.Add(prmVideoDescriptionAR);
                     }



                    

                    if (obj.VideoFile != "")
                    {
                        DbParameter prmVideoFile = con.createParameter();
                        prmVideoFile.ParameterName = "@VideoFile";
                        prmVideoFile.DbType =DbType.String;
                        if (obj.VideoFile == null)
                        {
                            prmVideoFile.Value = DBNull.Value;
                        }
                        else
                        {
                            prmVideoFile.Value = obj.VideoFile;
                        }
                        strWhere += " [VideoFile]=@VideoFile AND ";
                        lstParameters.Add(prmVideoFile);
                     }



                    


            if (strWhere != "")
                        strWhere = " where " + strWhere.Substring(0, strWhere.LastIndexOf("AND"));

                    

            

            List<SupportVideos> lstRet = Select(con, "", strWhere, lstParameters.ToArray());

            return lstRet;
        }


        public List<SupportVideos> Search(SupportVideos obj)
        {
            ClassDataHandler con = new ClassDataHandler(_Connection, _Provider);

            con.OpenConnection();

            List<SupportVideos> lstRet = Search(con,obj);

            con.CloseConnection();

            return lstRet;
        }


                

            
public List<SupportVideos> SearchOrLike(ClassDataHandler con, SupportVideos obj)
        {
            string strWhere = "";
            List<DbParameter> lstParameters = new List<DbParameter>();

            
                    if (obj.ID != -1)
                    {
                        DbParameter prmID = con.createParameter();
                        prmID.ParameterName = "@ID";
                        prmID.DbType =DbType.Int64;
                        if (obj.ID == null)
                        {
                            prmID.Value = DBNull.Value;
                        }
                        else
                        {
                            prmID.Value = obj.ID;
                        }
                        strWhere += " [ID]=@ID OR ";
                        lstParameters.Add(prmID);
                     }



                    

                    if (obj.VideoTitleEN != "")
                    {
                        DbParameter prmVideoTitleEN = con.createParameter();
                        prmVideoTitleEN.ParameterName = "@VideoTitleEN";
                        prmVideoTitleEN.DbType =DbType.String;
                        if (obj.VideoTitleEN == null)
                        {
                            prmVideoTitleEN.Value = DBNull.Value;
                        }
                        else
                        {
                            prmVideoTitleEN.Value = obj.VideoTitleEN;
                        }
                        strWhere += " [VideoTitleEN] LIKE @VideoTitleEN OR ";
                        lstParameters.Add(prmVideoTitleEN);
                     }



                    

                    if (obj.VideoTitleAR != "")
                    {
                        DbParameter prmVideoTitleAR = con.createParameter();
                        prmVideoTitleAR.ParameterName = "@VideoTitleAR";
                        prmVideoTitleAR.DbType =DbType.String;
                        if (obj.VideoTitleAR == null)
                        {
                            prmVideoTitleAR.Value = DBNull.Value;
                        }
                        else
                        {
                            prmVideoTitleAR.Value = obj.VideoTitleAR;
                        }
                        strWhere += " [VideoTitleAR] LIKE @VideoTitleAR OR ";
                        lstParameters.Add(prmVideoTitleAR);
                     }



                    

                    if (obj.VideoDescriptionEN != "")
                    {
                        DbParameter prmVideoDescriptionEN = con.createParameter();
                        prmVideoDescriptionEN.ParameterName = "@VideoDescriptionEN";
                        prmVideoDescriptionEN.DbType =DbType.String;
                        if (obj.VideoDescriptionEN == null)
                        {
                            prmVideoDescriptionEN.Value = DBNull.Value;
                        }
                        else
                        {
                            prmVideoDescriptionEN.Value = obj.VideoDescriptionEN;
                        }
                        strWhere += " [VideoDescriptionEN] LIKE @VideoDescriptionEN OR ";
                        lstParameters.Add(prmVideoDescriptionEN);
                     }



                    

                    if (obj.VideoDescriptionAR != "")
                    {
                        DbParameter prmVideoDescriptionAR = con.createParameter();
                        prmVideoDescriptionAR.ParameterName = "@VideoDescriptionAR";
                        prmVideoDescriptionAR.DbType =DbType.String;
                        if (obj.VideoDescriptionAR == null)
                        {
                            prmVideoDescriptionAR.Value = DBNull.Value;
                        }
                        else
                        {
                            prmVideoDescriptionAR.Value = obj.VideoDescriptionAR;
                        }
                        strWhere += " [VideoDescriptionAR] LIKE @VideoDescriptionAR OR ";
                        lstParameters.Add(prmVideoDescriptionAR);
                     }



                    

                    if (obj.VideoFile != "")
                    {
                        DbParameter prmVideoFile = con.createParameter();
                        prmVideoFile.ParameterName = "@VideoFile";
                        prmVideoFile.DbType =DbType.String;
                        if (obj.VideoFile == null)
                        {
                            prmVideoFile.Value = DBNull.Value;
                        }
                        else
                        {
                            prmVideoFile.Value = obj.VideoFile;
                        }
                        strWhere += " [VideoFile] LIKE @VideoFile OR ";
                        lstParameters.Add(prmVideoFile);
                     }



                    


            if (strWhere != "")
                        strWhere = " where " + strWhere.Substring(0, strWhere.LastIndexOf("OR"));

                    

            

            List<SupportVideos> lstRet = Select(con, "", strWhere, lstParameters.ToArray());

            return lstRet;
        }


        public List<SupportVideos> SearchOrLike(SupportVideos obj)
        {
            ClassDataHandler con = new ClassDataHandler(_Connection, _Provider);

            con.OpenConnection();

            List<SupportVideos> lstRet = SearchOrLike(con,obj);

            con.CloseConnection();

            return lstRet;
        }


                
        


       
        



    }
}











            